Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oqamar cleanup1 #37

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Oqamar cleanup1 #37

wants to merge 3 commits into from

Conversation

oqamar
Copy link

@oqamar oqamar commented Oct 22, 2019

No description provided.

Comment on lines -125 to +123
return time.Now(), fmt.Errorf("ibgo: '%s' too short to be datetime format '%s'", timeString, format)
return t, fmt.Errorf("ibgo: '%s' too short to be datetime format '%s'", timeString, format)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this change? As t is never set, so it would be the default value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just trying to make consistent with idiomatic Go. For example, in the case of:
t, err := time.Parse("20060102", "bad date")
The value of t is the default value

Comment on lines -131 to +129
return time.Now(), fmt.Errorf("ibgo: '%s' does not contain expected whitespace for datetime format '%s'", timeString, format)
return t, fmt.Errorf("ibgo: '%s' does not contain expected whitespace for datetime format '%s'", timeString, format)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Comment on lines -141 to +139
return time.Now(), fmt.Errorf("ibgo: '%s' wrong length to be datetime format '%s'", timeString, format)
return t, fmt.Errorf("ibgo: '%s' wrong length to be date format '%s'", timeString, format)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Comment on lines -159 to +157
return time.Now(), fmt.Errorf("ibgo: unsupported read time format '%v'", f)
return t, fmt.Errorf("ibgo: unsupported read time format '%v'", f)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

@@ -156,7 +154,7 @@ func readTime(b *bufio.Reader, f timeFmt) (t time.Time, err error) {
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing consistent change if returning error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants